Skip to content

ci(release): read package versions from root version files - #410

Open
tuntoja wants to merge 8 commits into
MON-205723-stream-connectors-tag-promotionfrom
MON-205723-stream-connectors-version-files
Open

tuntoja wants to merge 8 commits into
MON-205723-stream-connectors-tag-promotionfrom
MON-205723-stream-connectors-version-files

Conversation

@tuntoja

@tuntoja tuntoja commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Refs MON-205723

Description

Third step, stacked on #409: the fixed package versions move out of the workflow files, so that a higher version, not a CI change, decides what ships.

  • Root version files in KEY=value form (as in centreon), read by a "Get package version" step that rejects a malformed file. Each file is added to its workflow's paths:

    file content
    .version.stream-connectors-lib VERSION=3.8.2, RELEASE=1 (bumped: add more keywords to params to hide list #380, add new param drop_events_on_send_failure #388 and fix issue when host/service not found in cache when receiving downtime #393 changed sc_event, sc_flush and sc_params under 3.8.1)
    .version.lua-cffi VERSION=0.2.4, RELEASE=3 (bumped: enh(ci): removing ubuntu from ci (unsupported distro) #395 changed the deb dependency under 0.2.4-2)
    .version.lua-base64 / -lsqlite3 / -openssl / -sql-mysql / -tz unchanged (1.5.3-1, 0.9.7-1, 0.11.1-1, 2.7.0-1, 0.5-1)

    Upstream source pins (ref:, LSQLITE3_VERSION) stay in the workflows, so an upstream upgrade edits both files.

  • Connectors are versioned with the release number (.version.stream-connectors, YYYYMMNN, already checked by release-new) instead of the build date.

    • All builds of a release share one version; reinstall to test a rebuild.
    • Open the bump-stream-connectors-* PR right after each release, so develop doesn't build the stable number.
  • Tag promotion ignores CI-only changes of the versioned workflows (lib, lua-*): a version bump is what makes them ship.

    • stream-connectors.yml still counts its own changes, because the connectors' dependencies live in it.
  • release-new refuses a release with an unbumped package, before any write: content changed since the previous release tag without a higher version. For example: content changed since centreon-stream-connectors-20261000 without a higher version: .version.stream-connectors-lib 3.8.2-1 -> 3.8.2-1 (modules/centreon-stream-connectors-lib/sc_flush.lua).

    • The packages are an explicit list in release-new.sh, so the check doesn't depend on how workflows are wired (Add triggers for stream connectors #389).
    • A version file missing at the previous tag gives a "not checked" warning, which is the case for 20261000.
    • Bumping is the only escape hatch. Run a release-new dry run right after cutting the branch to catch it early.
  • Pulp safety net: testing delivery already refuses a version that is in stable (assert_not_in_stable), so a forgotten bump also fails at build time.

First release (20261000)

Type of change

  • Enhancement (non-breaking change)

How this pull request can be tested ?

  • Local harnesses:
    • release-new, 142 checks: the bump guard (unbumped, bumped, lowered, CI-only, missing version file, file missing at the previous tag), plus a check that the package list matches the repository's .version.* files and workflow paths;
    • tag context, 46 checks: versioned and connectors workflows, CI-only changes;
    • promotion, 111 checks.
    • Removing the guard, a package from the list, the "higher version" check or the .github/ exclusion makes the harnesses fail.
  • Guard on this repository's real content against a scratch origin: warning for 20261000, refusal after an unbumped lib change, success after a bump.
  • Lint: actionlint 1.7.7 with the CI flags, shellcheck, and yamllint 1.35.1.

The lib and lua-* versions move from workflow literals to .version.<package> (VERSION/RELEASE), so a version change is visible outside the CI files.
sc_event, sc_flush and sc_params changed since 3.8.1 (#380, #388, #393).
Connectors take .version.stream-connectors (YYYYMMNN) instead of the build date: builds of a release share its number and same-day rebuilds no longer collide.
A workflow whose only changes since the previous release tag are under .github/ is skipped; versions are bumped in the root version files.
release-new fails before any write when the content of a package with a root version file changed since the previous release tag but its version file did not.
The deb dependency changed from libffi7 | libffi8 to libffi8 (#395) under 0.2.4-2.
Only versioned workflows ignore their ci-only changes (connector dependencies live in stream-connectors.yml), the bump check requires a higher version and fails without yq, and the version steps reject a malformed version file.
@tuntoja tuntoja mentioned this pull request Oct 6, 2026
2 of 11 tasks
The bump check no longer reads the workflow paths, so it doesn't depend on how the packaging workflows are wired (see #389).
@tuntoja
tuntoja marked this pull request as ready for review October 6, 2026 16:19
@tuntoja
tuntoja requested review from a team as code owners October 6, 2026 16:19
@tuntoja
tuntoja requested review from kduret, mushroomempires and tanguyvda and removed request for a team October 6, 2026 16:19
@tuntoja tuntoja mentioned this pull request Oct 8, 2026
1 of 11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant